<h2>Księga gości</h2>
<p class="success green-box"><?php echo $this->Html->link("Wpisz się", array('action' => 'create')); ?></p>
<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>
<?php

foreach($data as $elem) {
   
   echo("<div class=\"questbook-entry\"><p>".$elem['GuestbookEntry']['content']."</p></div>");
   if($elem['GuestbookEntry']['guest'] == '1') echo("<span class=\"entry-author\">".$elem['GuestbookEntry']['nickname']."</span>");
   else echo("<span class=\"entry-author\">".$this->Html->link($elem['GuestbookEntry']['nickname'], array('controller' => 'users', 'action' => 'profile', $elem['User']['id'], $elem['User']['username']))."</span>");
}
?>
<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>